package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Markets generated by hbm2java
 */
@Entity
@Table(name="markets"
    ,catalog="madr_bd10"
)
public class Markets  implements java.io.Serializable {


     private Integer idMar;
     private MarketsReasons marketsReasons;
     private ProductionEvents productionEvents;
     private String sellInMar;
     private String sellToMar;
     private String toFactoryMar;
     private Boolean clasifyCassavaMar;
     private String pakageTypeCassavaMar;
     private Boolean cassavaMainProductMar;
     private Boolean intercroppingMar;
     private String additionalCropsMar;
     private Boolean proporcionOtrosCultivosMar;
     private String cropsHarvestMonthsMar;
     private Integer yearsGrowingCassavaMar;
     private Boolean increaseCroppedAreaMar;
     private Set incomesSourcesMarketses = new HashSet(0);
     private Set landUsesMarketses = new HashSet(0);
     private Set cropsTypeses = new HashSet(0);

    public Markets() {
    }

	
    public Markets(ProductionEvents productionEvents, String sellInMar, String sellToMar, String pakageTypeCassavaMar) {
        this.productionEvents = productionEvents;
        this.sellInMar = sellInMar;
        this.sellToMar = sellToMar;
        this.pakageTypeCassavaMar = pakageTypeCassavaMar;
    }
    public Markets(MarketsReasons marketsReasons, ProductionEvents productionEvents, String sellInMar, String sellToMar, String toFactoryMar, Boolean clasifyCassavaMar, String pakageTypeCassavaMar, Boolean cassavaMainProductMar, Boolean intercroppingMar, String additionalCropsMar, Boolean proporcionOtrosCultivosMar, String cropsHarvestMonthsMar, Integer yearsGrowingCassavaMar, Boolean increaseCroppedAreaMar, Set incomesSourcesMarketses, Set landUsesMarketses, Set cropsTypeses) {
       this.marketsReasons = marketsReasons;
       this.productionEvents = productionEvents;
       this.sellInMar = sellInMar;
       this.sellToMar = sellToMar;
       this.toFactoryMar = toFactoryMar;
       this.clasifyCassavaMar = clasifyCassavaMar;
       this.pakageTypeCassavaMar = pakageTypeCassavaMar;
       this.cassavaMainProductMar = cassavaMainProductMar;
       this.intercroppingMar = intercroppingMar;
       this.additionalCropsMar = additionalCropsMar;
       this.proporcionOtrosCultivosMar = proporcionOtrosCultivosMar;
       this.cropsHarvestMonthsMar = cropsHarvestMonthsMar;
       this.yearsGrowingCassavaMar = yearsGrowingCassavaMar;
       this.increaseCroppedAreaMar = increaseCroppedAreaMar;
       this.incomesSourcesMarketses = incomesSourcesMarketses;
       this.landUsesMarketses = landUsesMarketses;
       this.cropsTypeses = cropsTypeses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_mar", unique=true, nullable=false)
    public Integer getIdMar() {
        return this.idMar;
    }
    
    public void setIdMar(Integer idMar) {
        this.idMar = idMar;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="reason_increase_area_mar")
    public MarketsReasons getMarketsReasons() {
        return this.marketsReasons;
    }
    
    public void setMarketsReasons(MarketsReasons marketsReasons) {
        this.marketsReasons = marketsReasons;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_production_event_mar", nullable=false)
    public ProductionEvents getProductionEvents() {
        return this.productionEvents;
    }
    
    public void setProductionEvents(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
    
    @Column(name="sell_in_mar", nullable=false, length=7)
    public String getSellInMar() {
        return this.sellInMar;
    }
    
    public void setSellInMar(String sellInMar) {
        this.sellInMar = sellInMar;
    }
    
    @Column(name="sell_to_mar", nullable=false, length=24)
    public String getSellToMar() {
        return this.sellToMar;
    }
    
    public void setSellToMar(String sellToMar) {
        this.sellToMar = sellToMar;
    }
    
    @Column(name="to_factory_mar", length=19)
    public String getToFactoryMar() {
        return this.toFactoryMar;
    }
    
    public void setToFactoryMar(String toFactoryMar) {
        this.toFactoryMar = toFactoryMar;
    }
    
    @Column(name="clasify_cassava_mar")
    public Boolean getClasifyCassavaMar() {
        return this.clasifyCassavaMar;
    }
    
    public void setClasifyCassavaMar(Boolean clasifyCassavaMar) {
        this.clasifyCassavaMar = clasifyCassavaMar;
    }
    
    @Column(name="pakage_type_cassava_mar", nullable=false, length=23)
    public String getPakageTypeCassavaMar() {
        return this.pakageTypeCassavaMar;
    }
    
    public void setPakageTypeCassavaMar(String pakageTypeCassavaMar) {
        this.pakageTypeCassavaMar = pakageTypeCassavaMar;
    }
    
    @Column(name="cassava_main_product_mar")
    public Boolean getCassavaMainProductMar() {
        return this.cassavaMainProductMar;
    }
    
    public void setCassavaMainProductMar(Boolean cassavaMainProductMar) {
        this.cassavaMainProductMar = cassavaMainProductMar;
    }
    
    @Column(name="intercropping_mar")
    public Boolean getIntercroppingMar() {
        return this.intercroppingMar;
    }
    
    public void setIntercroppingMar(Boolean intercroppingMar) {
        this.intercroppingMar = intercroppingMar;
    }
    
    @Column(name="additional_crops_mar", length=50)
    public String getAdditionalCropsMar() {
        return this.additionalCropsMar;
    }
    
    public void setAdditionalCropsMar(String additionalCropsMar) {
        this.additionalCropsMar = additionalCropsMar;
    }
    
    @Column(name="proporcion_otros_cultivos_mar")
    public Boolean getProporcionOtrosCultivosMar() {
        return this.proporcionOtrosCultivosMar;
    }
    
    public void setProporcionOtrosCultivosMar(Boolean proporcionOtrosCultivosMar) {
        this.proporcionOtrosCultivosMar = proporcionOtrosCultivosMar;
    }
    
    @Column(name="crops_harvest_months_mar", length=50)
    public String getCropsHarvestMonthsMar() {
        return this.cropsHarvestMonthsMar;
    }
    
    public void setCropsHarvestMonthsMar(String cropsHarvestMonthsMar) {
        this.cropsHarvestMonthsMar = cropsHarvestMonthsMar;
    }
    
    @Column(name="years_growing_cassava_mar")
    public Integer getYearsGrowingCassavaMar() {
        return this.yearsGrowingCassavaMar;
    }
    
    public void setYearsGrowingCassavaMar(Integer yearsGrowingCassavaMar) {
        this.yearsGrowingCassavaMar = yearsGrowingCassavaMar;
    }
    
    @Column(name="increase_cropped_area_mar")
    public Boolean getIncreaseCroppedAreaMar() {
        return this.increaseCroppedAreaMar;
    }
    
    public void setIncreaseCroppedAreaMar(Boolean increaseCroppedAreaMar) {
        this.increaseCroppedAreaMar = increaseCroppedAreaMar;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="markets")
    public Set getIncomesSourcesMarketses() {
        return this.incomesSourcesMarketses;
    }
    
    public void setIncomesSourcesMarketses(Set incomesSourcesMarketses) {
        this.incomesSourcesMarketses = incomesSourcesMarketses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="markets")
    public Set getLandUsesMarketses() {
        return this.landUsesMarketses;
    }
    
    public void setLandUsesMarketses(Set landUsesMarketses) {
        this.landUsesMarketses = landUsesMarketses;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="crops_markets", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_market_cro_mar", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_crop_type_cro_mar", nullable=false, updatable=false) })
    public Set getCropsTypeses() {
        return this.cropsTypeses;
    }
    
    public void setCropsTypeses(Set cropsTypeses) {
        this.cropsTypeses = cropsTypeses;
    }




}


